package com.yonyou.cyxdms.sysAuth.service.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yonyou.cyx.framework.dao.base.SuperMapper;
import com.yonyou.cyxdms.sysAuth.service.dto.CompanyDTO;
import com.yonyou.cyxdms.sysAuth.service.dto.dealerchannel.DealerInfoDTO;
import com.yonyou.cyxdms.sysAuth.service.entity.CompanyPO;
import com.yonyou.cyxdms.sysAuth.service.entity.DealerchannelPO;
import com.yonyou.cyxdms.sysAuth.service.vo.companyorg.DealerchannelVO;
import com.yonyou.cyxdms.sysAuth.service.vo.dealerchannel.DealerChannelDetailVO;
import com.yonyou.cyxdms.sysAuth.service.vo.dealerchannel.DealerChannelVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 经销商渠道表 Mapper 接口
 * </p>
 *
 * @author quankk
 * @since 2019-07-05
 */
public interface DealerchannelMapper extends SuperMapper<DealerchannelPO> {
    /**
     * 查询用户
     *
     * @param companyId
     * @return
     * @author adu
     * @date 2019-01-10
     */
    DealerchannelVO Dealerchannel(@Param("companyId") Long companyId ,@Param("appId") String appId);

    /**
     * 查询除了自己的所有dealer信息(调拨申请单选择调出单位用)
     *
     * @param dealerCode
     * @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
     * @author renwd
     * @since 2019/7/9
     */
    List<Map<String, Object>> getDealerExceptSelf(@Param("dealerCode") String dealerCode);

    void upadateDealerBasicinfo(@Param("dealerStarLevel") Integer dealerStarLevel, @Param("dealerId") Long dealerId);

    Map<String, Object> findDealerBasicinfoById(@Param("dealerId") String dealerId);

    List<Map<String, Object>> getCodeName(@Param("id") String id);

    DealerChannelDetailVO getDealerChannelById(@Param("dealerId") Long dealerId);

    /**
     * 获取经销商基本信息
     *
     * @author dengqiang
     * @since 2019/7/25
     */
    Map<String, Object> getDealerBasicinfo();

    List<Map> queryDealerInfoExport(@Param("params") Map<String, String> queryParam);

}
